﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestRefector
{
    public class Class1
    {
        public static void Hello(string msg)
        {
            Console.WriteLine("hello world!/n/r{0}", msg);
        }

        /// <summary>
        /// 返回匿名类型，匿名类型是internal，所以不能跨程序集解析
        /// </summary>
        /// <returns></returns>
        public static dynamic Testdynamic()
        {
            return new { user = 1 };
        }
        /// <summary>
        /// 直接返回值类型
        /// </summary>
        /// <returns></returns>
        public static dynamic TestdynamicForValueType()
        {
            return 1;
        }
        /// <summary>
        /// 本程序集中可以解析匿名类型
        /// </summary>
        /// <returns></returns>
        public static int print()
        {
            return Testdynamic().user;
        }
    }
}
